package com.lzc.springPart.aop.cglb;

import org.springframework.cglib.core.Signature;

// 对应一个cglib代理对象
public class TargetFastClass {

    static Signature s0 = new Signature("eat","()V");

    public int getIndex(Signature signature){
        if (signature.equals(s0)){
            return 0;
        }
        return -1;
    }

    public Object invoke(int index, Object target, Object[] args){
        if (0 == index){
            ((CglibProxyDemo.Cat) target).eat();
            return null;
        }else {
            return null;
        }
    }
}
